home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: Mailbox/MIME Entity
(archive/mbox).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Mailbox/MIME Entity (archive/mbox)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| C source, ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/950 MIME Email (1.0)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 6c 61 6e 67 2e 63 2b | 2b 0a 50 61 74 68 3a 20 |.lang.c+|+.Path: |
|00000020| 6e 65 77 73 2e 65 6e 67 | 2e 63 6f 6e 76 65 78 2e |news.eng|.convex.|
|00000030| 63 6f 6d 21 61 72 63 6f | 21 75 73 65 6e 65 74 0a |com!arco|!usenet.|
|00000040| 46 72 6f 6d 3a 20 42 72 | 69 61 6e 20 4c 65 61 63 |From: Br|ian Leac|
|00000050| 68 20 3c 6c 61 73 62 66 | 6c 3e 0a 53 75 62 6a 65 |h <lasbf|l>.Subje|
|00000060| 63 74 3a 20 52 65 3a 20 | 4e 65 77 62 69 65 20 71 |ct: Re: |Newbie q|
|00000070| 75 65 73 74 69 6f 6e 20 | 72 65 3a 20 73 74 72 75 |uestion |re: stru|
|00000080| 63 74 20 70 6f 69 6e 74 | 65 72 73 20 26 20 6d 65 |ct point|ers & me|
|00000090| 6d 62 65 72 20 61 63 63 | 65 73 73 0a 58 2d 4e 6e |mber acc|ess.X-Nn|
|000000a0| 74 70 2d 50 6f 73 74 69 | 6e 67 2d 48 6f 73 74 3a |tp-Posti|ng-Host:|
|000000b0| 20 31 33 36 2e 32 32 36 | 2e 31 31 36 2e 31 0a 43 | 136.226|.116.1.C|
|000000c0| 6f 6e 74 65 6e 74 2d 54 | 79 70 65 3a 20 74 65 78 |ontent-T|ype: tex|
|000000d0| 74 2f 70 6c 61 69 6e 3b | 20 63 68 61 72 73 65 74 |t/plain;| charset|
|000000e0| 3d 75 73 2d 61 73 63 69 | 69 0a 4d 65 73 73 61 67 |=us-asci|i.Messag|
|000000f0| 65 2d 49 44 3a 20 3c 44 | 6e 79 6e 36 77 2e 33 39 |e-ID: <D|nyn6w.39|
|00000100| 70 40 6e 65 77 73 2e 61 | 72 63 6f 2e 63 6f 6d 3e |p@news.a|rco.com>|
|00000110| 0a 54 6f 3a 20 6a 72 61 | 6e 74 61 40 61 73 74 72 |.To: jra|nta@astr|
|00000120| 61 6c 2e 6d 61 67 69 63 | 2e 63 61 0a 53 65 6e 64 |al.magic|.ca.Send|
|00000130| 65 72 3a 20 75 73 65 6e | 65 74 40 6e 65 77 73 2e |er: usen|et@news.|
|00000140| 61 72 63 6f 2e 63 6f 6d | 0a 43 6f 6e 74 65 6e 74 |arco.com|.Content|
|00000150| 2d 54 72 61 6e 73 66 65 | 72 2d 45 6e 63 6f 64 69 |-Transfe|r-Encodi|
|00000160| 6e 67 3a 20 37 62 69 74 | 0a 4f 72 67 61 6e 69 7a |ng: 7bit|.Organiz|
|00000170| 61 74 69 6f 6e 3a 20 41 | 52 43 4f 20 4f 69 6c 20 |ation: A|RCO Oil |
|00000180| 25 20 47 61 73 20 43 6f | 6d 70 61 6e 79 0a 52 65 |% Gas Co|mpany.Re|
|00000190| 66 65 72 65 6e 63 65 73 | 3a 20 3c 34 68 6e 30 76 |ferences|: <4hn0v|
|000001a0| 32 24 37 71 35 40 61 61 | 68 7a 2e 6d 61 67 69 63 |2$7q5@aa|hz.magic|
|000001b0| 2e 6d 62 2e 63 61 3e 0a | 4d 69 6d 65 2d 56 65 72 |.mb.ca>.|Mime-Ver|
|000001c0| 73 69 6f 6e 3a 20 31 2e | 30 0a 44 61 74 65 3a 20 |sion: 1.|0.Date: |
|000001d0| 46 72 69 2c 20 38 20 4d | 61 72 20 31 39 39 36 20 |Fri, 8 M|ar 1996 |
|000001e0| 31 37 3a 35 36 3a 35 36 | 20 47 4d 54 0a 58 2d 4d |17:56:56| GMT.X-M|
|000001f0| 61 69 6c 65 72 3a 20 4d | 6f 7a 69 6c 6c 61 20 31 |ailer: M|ozilla 1|
|00000200| 2e 31 32 20 28 58 31 31 | 3b 20 49 3b 20 48 50 2d |.12 (X11|; I; HP-|
|00000210| 55 58 20 41 2e 30 39 2e | 30 35 20 39 30 30 30 2f |UX A.09.|05 9000/|
|00000220| 37 35 35 29 0a 58 2d 55 | 72 6c 3a 20 6e 65 77 73 |755).X-U|rl: news|
|00000230| 3a 34 68 6e 30 76 32 24 | 37 71 35 40 61 61 68 7a |:4hn0v2$|7q5@aahz|
|00000240| 2e 6d 61 67 69 63 2e 6d | 62 2e 63 61 0a 0a 6a 72 |.magic.m|b.ca..jr|
|00000250| 61 6e 74 61 40 61 73 74 | 72 61 6c 2e 6d 61 67 69 |anta@ast|ral.magi|
|00000260| 63 2e 63 61 20 28 6a 72 | 61 6e 74 61 29 20 77 72 |c.ca (jr|anta) wr|
|00000270| 6f 74 65 3a 0a 3e 48 69 | 21 0a 5b 73 6e 69 70 5d |ote:.>Hi|!.[snip]|
|00000280| 3e 69 6e 74 20 6d 61 69 | 6e 28 76 6f 69 64 29 0a |>int mai|n(void).|
|00000290| 3e 76 6f 69 64 20 65 6e | 74 65 72 28 69 6e 74 20 |>void en|ter(int |
|000002a0| 74 29 0a 3e 7b 0a 3e 20 | 63 61 72 20 2a 70 74 72 |t).>{.> |car *ptr|
|000002b0| 20 3d 20 6e 65 77 20 63 | 61 72 5b 74 5d 3b 0a 3e | = new c|ar[t];.>|
|000002c0| 20 66 6f 72 28 69 6e 74 | 20 61 3d 30 3b 61 3c 74 | for(int| a=0;a<t|
|000002d0| 3b 61 2b 2b 2c 70 74 72 | 2b 2b 29 0a 3e 20 20 20 |;a++,ptr|++).> |
|000002e0| 20 7b 0a 3e 20 20 20 20 | 20 20 20 20 63 69 6e 2e | {.> | cin.|
|000002f0| 67 65 74 28 29 3b 20 2f | 2f 74 6f 20 63 6c 65 61 |get(); /|/to clea|
|00000300| 72 20 69 6e 70 75 74 20 | 71 75 65 75 65 28 61 6c |r input |queue(al|
|00000310| 74 2e 20 62 65 74 77 65 | 65 6e 20 73 74 72 69 6e |t. betwe|en strin|
|00000320| 67 73 20 26 20 6e 75 6d | 62 65 72 73 29 2e 0a 3e |gs & num|bers)..>|
|00000330| 20 20 20 20 20 20 20 20 | 63 6f 75 74 3c 3c 22 43 | |cout<<"C|
|00000340| 61 72 20 23 22 3c 3c 61 | 2b 31 3b 0a 3e 09 63 6f |ar #"<<a|+1;.>.co|
|00000350| 75 74 3c 3c 22 5c 6e 50 | 6c 65 61 73 65 20 65 6e |ut<<"\nP|lease en|
|00000360| 74 65 72 20 6d 61 6b 65 | 3a 20 22 3b 20 20 20 20 |ter make|: "; |
|00000370| 20 0a 3e 09 63 69 6e 2e | 67 65 74 6c 69 6e 65 28 | .>.cin.|getline(|
|00000380| 70 74 72 2d 3e 6d 61 6b | 65 2c 41 72 53 69 7a 65 |ptr->mak|e,ArSize|
|00000390| 29 3b 0a 3e 09 63 6f 75 | 74 3c 3c 22 5c 6e 45 6e |);.>.cou|t<<"\nEn|
|000003a0| 74 65 72 20 79 65 61 72 | 3a 20 22 3b 0a 3e 09 63 |ter year|: ";.>.c|
|000003b0| 69 6e 3e 3e 70 74 72 2d | 3e 79 65 61 72 3b 0a 3e |in>>ptr-|>year;.>|
|000003c0| 20 20 20 20 7d 20 0a 3e | 72 65 74 75 72 6e 3b 0a | } .>|return;.|
|000003d0| 3e 7d 0a 3e 0a 3e 49 20 | 61 74 74 65 6d 70 74 65 |>}.>.>I |attempte|
|000003e0| 64 20 74 6f 20 75 73 65 | 20 61 6e 6f 74 68 65 72 |d to use| another|
|000003f0| 20 22 66 6f 72 22 20 6c | 6f 6f 70 20 74 6f 20 64 | "for" l|oop to d|
|00000400| 69 73 70 6c 61 79 20 6f | 75 74 70 75 74 2c 20 62 |isplay o|utput, b|
|00000410| 75 74 20 49 20 74 68 69 | 6e 6b 20 74 68 61 74 20 |ut I thi|nk that |
|00000420| 49 27 6d 0a 3e 6e 6f 74 | 20 73 65 74 74 69 6e 67 |I'm.>not| setting|
|00000430| 20 74 68 65 20 70 6f 69 | 6e 74 65 72 20 70 72 6f | the poi|nter pro|
|00000440| 70 65 72 6c 79 20 61 74 | 20 74 68 65 20 66 69 72 |perly at| the fir|
|00000450| 73 74 20 72 65 63 6f 72 | 64 2e 20 20 54 68 69 73 |st recor|d. This|
|00000460| 20 69 73 20 77 68 65 72 | 65 20 6d 79 20 0a 3e 63 | is wher|e my .>c|
|00000470| 6f 6e 66 75 73 69 6f 6e | 20 6c 69 65 73 3a 20 68 |onfusion| lies: h|
|00000480| 6f 77 20 64 6f 20 49 20 | 73 65 74 20 74 68 65 20 |ow do I |set the |
|00000490| 70 6f 69 6e 74 65 72 20 | 61 74 20 74 68 65 20 62 |pointer |at the b|
|000004a0| 65 67 69 6e 6e 69 6e 67 | 20 61 6e 64 20 74 68 65 |eginning| and the|
|000004b0| 6e 20 69 6e 63 72 65 6d | 65 6e 74 0a 3e 69 74 3f |n increm|ent.>it?|
|000004c0| 20 20 4d 79 20 6f 75 74 | 70 75 74 20 77 61 73 20 | My out|put was |
|000004d0| 61 6c 6c 20 4e 55 4c 4c | 2c 20 61 73 20 6d 65 6e |all NULL|, as men|
|000004e0| 74 69 6f 6e 65 64 20 61 | 62 6f 76 65 2c 20 73 6f |tioned a|bove, so|
|000004f0| 20 49 20 67 75 65 73 73 | 20 74 68 61 74 20 49 20 | I guess| that I |
|00000500| 77 61 73 20 0a 3e 64 69 | 73 70 6c 61 79 69 6e 67 |was .>di|splaying|
|00000510| 20 66 72 6f 6d 20 74 68 | 65 20 6c 61 73 74 20 70 | from th|e last p|
|00000520| 6f 69 6e 74 65 72 20 70 | 6f 73 69 74 69 6f 6e 20 |ointer p|osition |
|00000530| 61 6e 64 20 6f 6e 2c 20 | 72 65 73 75 6c 74 69 6e |and on, |resultin|
|00000540| 67 20 69 6e 20 67 61 72 | 62 61 67 65 2e 0a 3e 0a |g in gar|bage..>.|
|00000550| 3e 41 6e 79 20 68 65 6c | 70 2f 68 69 6e 74 73 20 |>Any hel|p/hints |
|00000560| 77 6f 75 6c 64 20 62 65 | 20 61 70 70 72 65 63 69 |would be| appreci|
|00000570| 61 74 65 64 20 28 49 20 | 6b 6e 6f 77 20 74 68 69 |ated (I |know thi|
|00000580| 73 20 63 6f 6e 63 65 70 | 74 20 69 73 20 2a 76 65 |s concep|t is *ve|
|00000590| 72 79 2a 20 69 6d 70 6f | 72 74 61 6e 74 0a 3e 66 |ry* impo|rtant.>f|
|000005a0| 6f 72 20 4f 4f 50 2c 20 | 77 68 69 63 68 20 69 73 |or OOP, |which is|
|000005b0| 20 77 68 61 74 20 6d 79 | 20 63 6f 75 72 73 65 20 | what my| course |
|000005c0| 69 73 2e 29 2e 0a 5b 73 | 6e 69 70 5d 0a 3e 54 68 |is.)..[s|nip].>Th|
|000005d0| 61 6e 6b 73 20 61 20 6c | 6f 74 20 69 6e 20 61 64 |anks a l|ot in ad|
|000005e0| 76 61 6e 63 65 2c 0a 3e | 4a 6f 75 6e 69 0a 0a 4a |vance,.>|Jouni..J|
|000005f0| 6f 75 6e 69 2c 0a 0a 41 | 72 65 20 79 6f 75 20 72 |ouni,..A|re you r|
|00000600| 65 74 61 69 6e 69 6e 67 | 20 79 6f 75 72 20 70 6f |etaining| your po|
|00000610| 69 6e 74 65 72 20 74 6f | 20 74 6f 20 74 68 65 20 |inter to| to the |
|00000620| 61 72 72 61 79 3f 20 49 | 6e 20 79 6f 75 72 20 65 |array? I|n your e|
|00000630| 78 61 6d 70 6c 65 2c 20 | 70 74 72 20 69 73 20 61 |xample, |ptr is a|
|00000640| 0a 6c 6f 63 61 6c 20 76 | 61 72 69 61 62 6c 65 2e |.local v|ariable.|
|00000650| 2e 2e 20 49 20 64 6f 6e | 27 74 20 73 65 65 20 77 |.. I don|'t see w|
|00000660| 68 65 72 65 20 69 74 27 | 73 20 6f 72 69 67 69 6e |here it'|s origin|
|00000670| 61 6c 2c 20 75 6e 69 6e | 63 72 65 6d 65 6e 74 65 |al, unin|cremente|
|00000680| 64 20 76 61 6c 75 65 20 | 69 73 0a 73 61 76 65 64 |d value |is.saved|
|00000690| 2e 20 4f 6e 65 20 70 6f | 73 73 69 62 69 6c 69 74 |. One po|ssibilit|
|000006a0| 79 20 66 6f 72 20 63 68 | 61 6e 67 65 20 74 6f 20 |y for ch|ange to |
|000006b0| 79 6f 75 72 20 63 6f 64 | 65 20 77 6f 75 6c 64 20 |your cod|e would |
|000006c0| 62 65 20 74 6f 20 61 6c | 74 65 72 20 79 6f 75 72 |be to al|ter your|
|000006d0| 20 65 6e 74 65 72 28 29 | 0a 66 75 6e 63 74 69 6f | enter()|.functio|
|000006e0| 6e 20 74 6f 20 72 65 74 | 75 72 6e 20 74 68 65 20 |n to ret|urn the |
|000006f0| 70 6f 69 6e 74 65 72 20 | 74 6f 20 74 68 65 20 63 |pointer |to the c|
|00000700| 61 72 20 61 72 72 61 79 | 2e 2e 2e 0a 0a 63 61 72 |ar array|.....car|
|00000710| 20 2a 65 6e 74 65 72 28 | 69 6e 74 20 74 29 0a 7b | *enter(|int t).{|
|00000720| 0a 20 20 63 61 72 20 2a | 70 74 72 3b 0a 20 20 63 |. car *|ptr;. c|
|00000730| 61 72 20 2a 72 65 74 3b | 0a 20 20 72 65 74 20 3d |ar *ret;|. ret =|
|00000740| 20 70 74 72 20 3d 20 6e | 65 77 20 63 61 72 5b 74 | ptr = n|ew car[t|
|00000750| 5d 3b 0a 20 20 20 2e 2e | 2e 2e 0a 20 20 72 65 74 |];. ..|... ret|
|00000760| 75 72 6e 20 72 65 74 3b | 0a 7d 0a 0a 54 68 65 20 |urn ret;|.}..The |
|00000770| 63 61 6c 6c 69 6e 67 20 | 66 75 6e 63 74 69 6f 6e |calling |function|
|00000780| 20 63 61 6e 20 74 68 65 | 6e 20 72 65 74 61 69 6e | can the|n retain|
|00000790| 20 74 68 65 20 76 61 6c | 75 65 3a 0a 0a 20 63 61 | the val|ue:.. ca|
|000007a0| 72 20 2a 63 61 72 5f 61 | 72 72 61 79 20 3d 20 65 |r *car_a|rray = e|
|000007b0| 6e 74 65 72 28 74 6f 74 | 61 6c 29 3b 0a 0a 0a 2d |nter(tot|al);...-|
|000007c0| 42 72 69 61 6e 20 3a 2d | 29 0a 2d 2d 20 0a 42 72 |Brian :-|).-- .Br|
|000007d0| 69 61 6e 20 46 2e 20 4c | 65 61 63 68 0a 53 72 2e |ian F. L|each.Sr.|
|000007e0| 20 53 79 73 74 65 6d 73 | 20 41 6e 61 6c 79 73 74 | Systems| Analyst|
|000007f0| 0a 6c 61 73 62 66 6c 40 | 61 61 69 2e 61 72 63 6f |.lasbfl@|aai.arco|
|00000800| 2e 63 6f 6d 0a 0a 54 65 | 6c 65 70 68 6f 6e 65 3a |.com..Te|lephone:|
|00000810| 09 28 39 30 37 29 20 32 | 36 33 2d 34 38 36 30 0a |.(907) 2|63-4860.|
|00000820| 46 41 58 3a 09 09 28 39 | 30 37 29 20 32 36 35 2d |FAX:..(9|07) 265-|
|00000830| 36 32 39 38 0a 0a 41 52 | 43 4f 20 41 6c 61 73 6b |6298..AR|CO Alask|
|00000840| 61 2c 20 49 6e 63 2e 0a | 41 54 4f 2d 31 36 35 36 |a, Inc..|ATO-1656|
|00000850| 0a 50 2e 4f 2e 20 42 6f | 78 20 31 30 30 33 36 30 |.P.O. Bo|x 100360|
|00000860| 0a 41 6e 63 68 6f 72 61 | 67 65 2c 20 41 4b 20 39 |.Anchora|ge, AK 9|
|00000870| 39 35 31 30 2d 30 33 36 | 30 0a 0a |9510-036|0.. |
+--------+-------------------------+-------------------------+--------+--------+